<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="/static/lib/css/bootstrap4.3.1.css"/>
    <link rel="stylesheet" href="/static/css/header.css">
    <link rel="stylesheet" href="/static/css/footer.css">
    <link rel="stylesheet" type="text/css" href="/static/activity/css/activity.css"/>
</head>
<body>
{% include 'module/header.html' %}
<div class="main">
    <div class="container">
        <div class="row align-items-center">
            <h2 class="col"><a href="{% url 'course' %}">课程培训</a></h2>
            <div class="more">
                <a href="{% url 'course' %}">more</a>
            </div>
        </div>

        <div class="row">
            {% for course in course_top3 %}
                {% if course.img %}
                    <div class="col-4">
                        <div class="item courses" courseid="{{ course.id }}"
                             style="background: url('/media/{{ course.img }}');
                                     background-repeat:no-repeat;
                                     background-size: cover;
                                     background-position:center;">
                            <div class="content">
                                <div class="title">{{ course.title }}</div>
                                <div class="time">{{ course.abstract }}</div>
                            </div>
                        </div>
                    </div>
                {% else %}
                    <div class="col-4">
                        <div class="item courses" courseid="{{ course.id }}"
                             style="background: url('/media/img/course/default.jpg');
                     background-repeat:no-repeat;
                     background-size: cover;
                     background-position:center;">
                            <div class="content">
                                <div class="title">{{ course.title }}</div>
                                <div class="time">{{ course.abstract }}</div>
                            </div>
                        </div>
                    </div>
                {% endif %}
            {% endfor %}
        </div>
    </div>
    <div class="container">
        <div class="row align-items-center">
            <h2 class="col"><a href="{% url 'projectDevelop' %}">项目开发</a></h2>
            <div class="more">
                <a href="{% url 'projectDevelop' %}">more</a>
            </div>
        </div>

        <div class="row">
            {% for project_develop in project_develop_top3 %}
                {% if project_develop.img %}
                    <div class="col-4">
                        <div class="item project_develops" project_develop_id="{{ project_develop.id }}"
                             style="background: url('/media/{{ project_develop.img }}');
                                     background-repeat:no-repeat;
                                     background-size: cover;
                                     background-position:center;">
                            <div class="content">
                                <div class="title">{{ project_develop.title }}</div>
                                <div class="time">{{ project_develop.abstract }}</div>
                            </div>
                        </div>
                    </div>
                {% else %}
                    <div class="col-4">
                        <div class="item project_develops" project_develop_id="{{ project_develop.id }}"
                             style="background: url('/media/img/project/default.jpg');
                     background-repeat:no-repeat;
                     background-size: cover;
                     background-position:center;">
                            <div class="content">
                                <div class="title">{{ project_develop.title }}</div>
                                <div class="time">{{ project_develop.abstract }}</div>
                            </div>
                        </div>
                    </div>
                {% endif %}

            {% endfor %}
        </div>
    </div>
    <div class="container">
        <div class="row align-items-center">
            <h2 class="col"><a href="{% url 'contest' %}">编程比赛</a></h2>
            <div class="more">
                <a href="{% url 'contest' %}">more</a>
            </div>
        </div>

        <div class="row">
            {% for contest in contest_top3 %}
                {% if contest.img %}
                    <div class="col-4">
                    <div class="item contests" contestid="{{ contest.id }}"
                        style="background: url('/media/{{ contest.img }}');
                     background-repeat:no-repeat;
                     background-size: cover;
                     background-position:center;">
                        <div class="content">
                            <div class="title">{{ contest.title }}</div>
                            <div class="time">{{ contest.abstract }}</div>
                        </div>
                    </div>
                </div>
                {% else %}
                    <div class="col-4">
                    <div class="item contests" contestid="{{ contest.id }}"
                        style="background: url('/media/img/contest/default.jpg');
                     background-repeat:no-repeat;
                     background-size: cover;
                     background-position:center;">
                        <div class="content">
                            <div class="title">{{ contest.title }}</div>
                            <div class="time">{{ contest.abstract }}</div>
                        </div>
                    </div>
                </div>
                {% endif %}

            {% endfor %}
        </div>
    </div>
</div>
{% include 'module/footer.html' %}
<script src="/static/lib/js/jquery3.4.1.js"></script>
<script src="/static/lib/js/Bootstrap4.3.1.bundle.js"></script>
<script src="/static/lib/js/typelighter.js"></script>
<script src="/static/activity/js/main.js"></script>
</body>
</html>
